#include "string.h"

dj::string::string()
{
	_ch = nullptr;
	_size = 0;
	_capacity = 0;
}
dj::string::string(const char*ch)
{
	int sz = strlen(ch);
	_size = _capacity = sz;
	_ch = new char[_size + 1];
	memcpy(_ch, ch, _size + 1);
}
char* dj::string::c_str()
{
	return _ch;
}
dj::string::string(const string&s)
{
	_capacity = s._capacity;
	_size = s._size;
	_ch = new char[_size + 1];
	memcpy(_ch, s._ch, _size + 1);
}
